<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>iphoneCheckbox</title>
<%@ include file="/common/header/meta.jsp"%>
<%@ include file="/common/header/script.jsp"%>

<style type="text/css">
    body {
      padding: 10px; }
    .css_sized_container .iPhoneCheckContainer {
      width: 250px; }
  </style>
<script type="text/javascript" charset="utf-8">
    $(window).load(function() {
      $('.on_off :checkbox').iphoneStyle();
      $('.disabled :checkbox').iphoneStyle();
      $('.css_sized_container :checkbox').iphoneStyle({ resizeContainer: false, resizeHandle: false });
      $('.long_tiny :checkbox').iphoneStyle({ checkedLabel: 'Very Long Text', uncheckedLabel: 'Tiny' });
      
      var onchange_checkbox = ($('.onchange :checkbox')).iphoneStyle({
        onChange: function(elem, value) { 
          $('span#status').html(value.toString());
        }
      });
      
      setInterval(function() {
        onchange_checkbox.prop('checked', !onchange_checkbox.is(':checked')).iphoneStyle("refresh");
        return
      }, 2500);
    });
  </script>
</head>

<body>
    
    <table>
    <tr class="disabled">
      <th><label for="disabled">Disabled</label></th>
      <td>
        <input type="checkbox" id="disabled" disabled="disabled" />
      </td>
    </tr>
    <tr class="on_off">
      <th><label for="on_off">Default</label></th>
      <td>
        <input type="checkbox" id="on_off" />
      </td>
    </tr>
    <tr class="on_off">
      <th><label for="on_off_on">Default On</label></th>
      <td>
        <input type="checkbox" checked="checked" id="on_off_on"/>
      </td>
    </tr>
    <tr class="css_sized_container">
      <th><label for="css_sized_container">CSS Sized Container and Handle</label></th>
      <td>
        <input type="checkbox" id="css_sized_container" />
      </td>
    </tr>
    <tr class="long_tiny">
      <th><label class="left" for="long_tiny">Long and short labels</label></th>
      <td>
        <input type="checkbox" id="long_tiny" />
      </td>
    </tr>
    <tr class="onchange">
      <th>Event tracking</th>
      <td>
        <input type="checkbox" id="onchange" />
        <p>Checkbox status is <strong><span id="status">...</span></strong>.</p>
      </td>
    </tr>
  </table>
    
</body>

</html>
